package com.ydw.profile_;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

/**
 * @author HYL
 * @create 2017-07-06 下午3:40
 **/
@Configuration
@Component
public class Profile_Config {

    @Profile("dev")
    @Bean
    Demo demo(){
        return new Demo("from dev");
    }

    @Profile("prod")
    @Bean
    Demo demo_(){
        return new Demo("from prod");
    }
}
